Load libraries
Load files
df1 contains the mean kappa loss value of all datasets
for each level of noise only.
Plot each technique separately
Plot all techniques overlapping
Plot as a grid
df2 contains the mean kappa loss value of all datasets
for each decile and level of noise.
Plot each technique separately
Plot all techniques overlapping
for(instance in instances_names) {
# Filter data for the current instance percentage
filtered_data <- subset(df2, percentage == instance)
# Create plot
p2 <- ggplot(filtered_data, aes(x = noise, y = kappa_loss, color = factor(technique))) +
geom_point() +
geom_line(aes(noise)) +
labs(x = "Noise", y = "Kappa Loss", color = "Technique") +
ggtitle(paste0("Kappa Loss Curves by technique, noise and ", instance, " % of instances altered")) +
theme_bw() +
scale_y_continuous(limits = c(0.0, 0.5), breaks = seq(0, 1, by = 0.1))
# Print plot
print(p2)
}
Plot as grid for deciles
# Create plot
p2 <- ggplot(df2, aes(x = percentage, y = kappa_loss, color = factor(noise))) +
geom_point() +
geom_line(aes(percentage)) +
labs(x = "Noise", y = "Kappa Loss") +
ggtitle("Kappa Loss Curves by technique, noise and percentage of instances altered") +
theme_bw() +
scale_y_continuous(limits = c(0.0, 0.5), breaks = seq(0, 1, by = 0.1)) +
facet_wrap(~ technique)
# Print plot
print(p2)
ggsave("results/plots/KLC_means_instances.png", p2, width = 20, height = 16, dpi = 600)
Plot as grid for quartiles
# Create plot
p3 <- ggplot(df2_q, aes(x = percentage, y = kappa_loss, color = factor(noise))) +
geom_point() +
geom_line(aes(percentage)) +
labs(x = "Noise", y = "Kappa Loss") +
ggtitle("Kappa Loss Curves by technique, noise and percentage of instances altered") +
theme_bw() +
scale_y_continuous(limits = c(0.0, 0.5), breaks = seq(0, 1, by = 0.1)) +
facet_wrap(~ technique)
# Print plot
print(p3)
ggsave("results/plots/KLC_means_instances_q.png", p3, width = 20, height = 16, dpi = 600)